home *** CD-ROM | disk | FTP | other *** search
- # option menu
-
- proc optionCB {w} {
- puts stdout "selected: $w"
- .rc.option1 getValues \
- -menuHistory h
- puts stdout "history: $h"
- }
-
- xtAppInitialize -class Program
-
- xmRowColumn .rc managed
-
- xmPulldownMenu .rc.pulldown1
- xmPushButton .rc.pulldown1.options1 managed \
- -labelString "value 1"
- .rc.pulldown1.options1 activateCallback {optionCB %w}
-
-
- xmPushButton .rc.pulldown1.options2 managed \
- -labelString "value 2"
- .rc.pulldown1.options2 activateCallback {optionCB %w}
-
- xmOptionMenu .rc.option1 managed \
- -labelString "Option set" \
- -subMenuId .rc.pulldown1
-
- . realizeWidget
-
- . mainLoop
-